package org.i77soft.games.MineAcerLite.scenes;

import org.i77soft.games.LGame.engine.Scene;
import org.loon.framework.android.game.core.graphics.LImage;
import org.loon.framework.android.game.core.graphics.device.LGraphics;

import org.i77soft.games.LGame.engine.Images;
import org.i77soft.games.MineAcerLite.scenes.GameScene;
import org.i77soft.games.MineAcerLite.scenes.GameMenuScene;

public class IntroScene extends Scene {

    private static LImage logoScreen = Images.load("/title.png");
    private GameScene gameScreen;
    private int passedTime;

    public IntroScene() {
        gameScreen = new GameScene();
        passedTime = 0;
    }

    public void tick() {
        if (passedTime++ < 40) {
            clicked = false;
            return;
        }
        if (clicked || mineSweeper.controller.buttons[4]) {
            mineSweeper.setScene(new GameMenuScene(gameScreen));
        }
    }

    public void render(LGraphics g) {
        g.drawImage(logoScreen, 0, 0);
    }

}
